package com.zmn.plat.services.interfaces.channel;

import java.util.List;

import com.zmn.plat.model.entity.channel.ChannelCommission;

/**
 * 渠道佣金
 *
 * @author xiangjunming
 * @since 2019 /08/19 12:12:02
 */
public interface ChannelCommissionService {

    /**
     * 根据ID查询
     *
     * @param id
     *            the id
     * @return the channel new commission
     */
    ChannelCommission findByKey(Integer id);

    /**
     * 查询新佣金比例不为空
     *
     * @return the list
     */
    List<ChannelCommission> listByCommissionNewNotNull();

    /**
     * 根据渠道ID查询佣金比例
     *
     * @param channelId
     *            the channel id
     * @return the list
     */
    List<ChannelCommission> listByChannelId(Integer channelId);

    /**
     * 根据渠道ID服务分类ID查询佣金比例
     *
     * @param channelId
     *            the channel id
     * @param servCategId
     *            the serv categ id
     * @return the list
     */
    ChannelCommission findByChannelIdAndServCategId(Integer channelId, Integer servCategId);

    /**
     * 根据ID修改
     *
     * @param record
     *            the record
     * @return the int
     */
    int updateByKey(ChannelCommission record);

    /**
     * 根据ID修改
     *
     * @param record
     *            the record
     * @return the int
     */
    int updateByKeySelective(ChannelCommission record);

    /**
     * 新增
     *
     * @param record
     *            the record
     * @return the int
     */
    int insert(ChannelCommission record);

    /**
     * 删除
     *
     * @param id
     *            the id
     * @return the int
     */
    int deleteByKey(Integer id);

    /**
     * 描述: 从旧渠道复制到新渠道
     *
     * @param originalChannelId 原渠道ID
     * @param targetChannelId 新渠道ID
     * @param operator 操作者
     * @return java.lang.Boolean
     * @author guoqiao
     * @since 2021/6/8 13:49
     */
    void copy(Integer originalChannelId, int targetChannelId, String operator);
}